<?php
namespace Admin\Model;
use Think\Model;

class ModulesModel extends Model{
    protected  $pk='mid';
    protected  $tablename="modules";
    protected $_validate=[
        ['name','require','模块名字不为空',3],
        ['title','require','模块标识不为空',3],
        ['action','require','模块动作不为空',3],
    ];

    /**
     * @param $data
     * 模块装载
     */
    public  function store($data){
          if($this->create($data)){
            $this->add();
              return true;

          }
    }
}